/*
 *	test.cpp
 *
 *	Created on 3/1/2011 by Alan Mattila
 *	Test file for unit testing the Board class.
 */

#include <iostream>

#include "Board.h"
#include "Checkers.h"

using namespace std;


int main(int argc, char **argv)
{
	vector<MoveData*> data;
	Checkers checkers;


	cout << "Current Player: " << checkers.GetCurrentPlayer() << endl;
	cout << *(checkers.GetBoard());
	checkers.GetLegalMoves(data);


	// Move one guy out for first player
	checkers.Move(2,5,3,4);
	cout << "Current Player: " << checkers.GetCurrentPlayer() << endl;
	cout << *(checkers.GetBoard());
	checkers.GetLegalMoves(data);
	// Move one guy out for second player
	checkers.Move(1,2,2,3);
	cout << "Current Player: " << checkers.GetCurrentPlayer() << endl;
	cout << *(checkers.GetBoard());
	checkers.GetLegalMoves(data);
	// Player 1 jumps player 2 guy 
	checkers.Move(3,4,1,2);
	cout << "Current Player: " << checkers.GetCurrentPlayer() << endl;
	cout << *(checkers.GetBoard());
	checkers.GetLegalMoves(data);
	// Player 2 jumps player 1 guy 
	checkers.Move(0,1,2,3);
	cout << "Current Player: " << checkers.GetCurrentPlayer() << endl;
	cout << *(checkers.GetBoard());
	checkers.GetLegalMoves(data);

	checkers.ClearLegalMoves(data);

	system("pause");

	return 0;
}


	//Board *board = new Board();
	//for(unsigned i=0; i<BOARD_Y; i++)
	//{
	//	for(unsigned j=0; j<BOARD_X; j++)
	//	{
	//		board->SetValue(j, i, (i*BOARD_Y + j));
	//	}
	//}
	//
	//cout << "Test: Here is a test array\n";
	//delete board;

	//board = checkers.GetBoard();
	//for(unsigned i=0; i<BOARD_Y; i++)
	//{
	//	for(unsigned j=0; j<BOARD_X; j++)
	//	{
	//		cout << board->GetValue(j, i) << " ";
	//	}
	//	cout << endl;
	//}

	//Board board2;
	//board2 = *(checkers.GetBoard());
	//board = 0;

